#include <iostream>
#include <string>
#include <vector>
using namespace std;
void analyzeWords(const string& inputString) {
    vector<string> words;
    string word;
    for (char c : inputString) {
        if (c == ' ') {
            if (!word.empty()) {
                words.push_back(word);
                word.clear();
            }
        } else {
            word += c;
        }
    }
    if (!word.empty()) {
        words.push_back(word);
    }

    int k = words.size();
    int Words = 0;
    int latin = 0;
    int shortWords = 0;
    int dash = 0;
    string longestWord;
    int longestLength = 0;

    for (const string& w : words) {
        if (isupper(w[0])) {
            Words++;
        }
        bool hasLatin = false;
        for (char c : w) {
            if (isalpha(c) && isascii(c)) {
                hasLatin = true;
                break;
            }
        }
        if (hasLatin) {
            latin++;
        }
        if (w.length() <= 3) {
            shortWords++;
        }
        if (w.find('-') != string::npos) {
            dash++;
        }
        if (w.length() > longestLength) {
            longestLength = w.length();
            longestWord = w;
        }
    }

    cout << "total entered words: " << k << endl;
    cout << "words starting with an uppercase letter: " << Words << endl;
    cout << "words containing Latin characters: " << latin << endl;
    cout << "number of words containing less than three characters: " << shortWords << endl;
    cout << "number of words containing a dash: " << dash << endl;
    cout << "Longest word: " << longestWord << endl;
    cout << "its length: " << longestLength << endl;
}

int main() {
    string inputWords;
    cout << "Enter words separated by spaces: ";
    getline(cin, inputWords);
    analyzeWords(inputWords);
    return 0;
}
